<template>
    <div class="product_list" :style="{ 'height': productsHeight }">
        <div style="height: 16vw;background: #fff;"></div>
        <div style="" class="product_list_serch-text">
            <van-search class="product_list_serch1" v-model="searchValue" shape="round" background="#F6FAFF" />
            <van-button class="search_left_button" round type="primary" @click="onSearch">搜索</van-button>
        </div>
        <van-pull-refresh v-model="refreshing" @refresh="onRefresh" :style="{ 'height': refreshHeight }">
            <van-list v-model:loading="loading" :finished="finished" @load="onLoad">
                <template v-slot:finished>
                    <div class="nothing_div" v-if="list.length == 0 && !refreshing">
                        <van-image :src="nothingData"></van-image>
                        <div class="nothing_font">暂无数据</div>
                    </div>
                </template>
                <div class="product_list_van_list">
                    <div v-for="(item, index) in list" :key="index" class="product_list_van_list_div"
                        :style="{ 'background-color': item.checked ? '#E2F3FF' : '#fff', 'height': item.auditStatus == '8' ? '40vw' : '34.6vw' }">
                        <van-swipe-cell>
                            <van-image :src="item?.productImages" class="van-image" @click="handleGetDetails(item.id)">
                                <template v-slot:error>加载失败</template>
                                <div class="liveStreamingMechanisms" v-if="item.hmMechanismsList[1]?.cooperationMode">
                                    多机制
                                </div>
                            </van-image>
                            <div class="div_right" @click="handleGetDetails(item.id)" :style="{
                                width: multipleChoice
                                    ? 'calc(100% - 27.4vw)'
                                    : 'calc(100% - 21.1vw)',
                            }">
                                <div class="div_right_top">
                                    <div class="style_name">
                                        <van-text-ellipsis :content="item.styleName" />
                                    </div>
                                    <!-- <div :class="item.auditStatus > 0 ? 'stats' + item.auditStatus : 'stats'">
                                        {{ auditStatusNameById(item.auditStatus) }}
                                    </div> -->
                                    <div class="status"
                                        :style="computedAtatusColor(auditStatusNameById(item.auditStatus))">{{
                                            auditStatusNameById(item.auditStatus) }}</div>
                                </div>
                                <div class="div_right_center">
                                    <van-text-ellipsis rows="1" :content="item.sellingPoints" />
                                </div>
                                <div class="div_right_bottom">
                                    <div class="price" v-if="item.hmMechanismsList[0]?.cooperationMode == '分佣'">￥ {{
                                        item.hmMechanismsList[0].price }}</div>
                                    <div class="price" v-if="item.hmMechanismsList[0]?.cooperationMode == '供货'">￥ {{
                                        item.hmMechanismsList[0].costPrice }}</div>

                                    <div class="commission" v-if='item.hmMechanismsList[0]?.commission'>
                                        佣 {{ (item.hmMechanismsList[0].commission || 0) + "%" }}
                                    </div>
                                </div>
                                <div class="liveStreamingMechanism">
                                    <div class="costPrice" v-if="item.hmMechanismsList[0]?.cooperationMode == '分佣'">{{
                                        item.hmMechanismsList[0].costPrice }}</div>
                                    {{ item.hmMechanismsList[0]?.liveStreamingMechanism }}
                                </div>
                            </div>
                            <!-- 入库操作 -->
                            <div class="warehousing">
                                <div class="adopt_icon">
                                    <div class="adopt_icon_item">
                                        供销合同
                                        <van-image :src="item.sellStatus == '1' ? adopt : adopted"></van-image>
                                    </div>
                                    <div class="adopt_icon_item">
                                        资质审核
                                        <van-image :src="qualificationReview(item)"></van-image>
                                    </div>
                                    <div class="adopt_icon_item">
                                        核价审批
                                        <van-image :src="auditReview(item)"></van-image>
                                    </div>
                                    <div class="adopt_icon_item">
                                        入库状态
                                        <van-image :src="stockReview(item)"></van-image>
                                    </div>
                                </div>
                            </div>
                        </van-swipe-cell>
                    </div>
                </div>
            </van-list>
        </van-pull-refresh>
    </div>
</template>
<script setup lang="ts">
import { computed, onMounted, ref, watch, onUnmounted } from "vue";
import { listSupplierAddProduct } from "@/api/productList/index";
import { auditStatusNameById } from "@/utils/auditStatusFilter";
import { useRoute, useRouter } from "vue-router";
import { getEnvValue } from "@/utils/index";
const router = useRouter();
const queryParams = ref<any>({
    pageNum: 1,
    pageSize: 10,
    styleName: "",
    auditStatus: "",
    supplierName: ""
});
const nothingData = new URL("@/assets/porduct/icon_zanwushuju.png", import.meta.url).href
const searchValue = ref("");

const serchListActive = ref(0);
const refreshing = ref(false);
const loading = ref(false);
const finished = ref(false);
const list = ref<any[]>([]);
const route = useRoute();
const flag = ref(false);
const showTop = ref(false)

const multipleChoice = ref(false);
const selectedItems = ref<any[]>([]); // 存储选中的项



const adopt = new URL("@/assets/porduct/icon_tongguo.png", import.meta.url).href
const adopted = new URL("@/assets/porduct/icon_weitongguo.png", import.meta.url).href
const questionMark = new URL("@/assets/porduct/questionMark.png", import.meta.url).href




// 限制连续刷新数据重复问题
const refreFlag = ref(true)

const serchFlag = ref(true)

const defaultPhoneHeight = ref(0) //屏幕默认高度
const nowPhoneHeight = ref(0) //屏幕现在的高度
const productsHeight = ref()
const refreshHeight = ref()
// 在组件挂载完成后添加事件监听器
onMounted(() => {
    defaultPhoneHeight.value = window.innerHeight;
    // 添加事件监听器
    window.addEventListener('resize', handleResize);
})
// 处理窗口大小变化的函数
const handleResize = () => {
    nowPhoneHeight.value = window.innerHeight;
};
// 在组件卸载前移除事件监听器
onUnmounted(() => {
    window.removeEventListener('resize', handleResize);
});
const emits = defineEmits(['doShow'])
watch(nowPhoneHeight, () => {
    if (defaultPhoneHeight.value != nowPhoneHeight.value) {
        // 当软键盘弹出,改变bottomIsSHow变量然后去控制bottom的显示与隐藏
        emits('doShow', false)
        productsHeight.value = 'calc(100vh)'
        refreshHeight.value = 'calc(100vh - 30.4vw)'
    } else {
        // 相等代表软键盘收起后,与上同理
        emits('doShow', true)
        productsHeight.value = 'calc(100vh - 13.3vw)'
        refreshHeight.value = 'calc(100vh - 43.7vw)'
    }
})
/** 资质审核是否审核 */
const qualificationReview = (item: any) => {
    if (item.qualityAuditList) {
        if (!item.qualityAuditList.length) {
            return questionMark
        } else if (item.qualityAuditList.length) {
            // 审核通过
            if (item.qualityAuditList[0].auditStatus == 2) {
                return adopt
            } else if (item.qualityAuditList[0].auditStatus == 1) {
                return adopted
            } else if (item.qualityAuditList[0].auditStatus == 0) {
                return questionMark
            }
        }
    } else {
        return questionMark
    }
}
/** 核价是否审核 */
const auditReview = (item: any) => {
    if (item.auditList) {
        if (!item.auditList.length) {
            return questionMark
        } else if (item.auditList.length) {
            // 审核通过
            if (item.auditList[0].auditStatus == 2) {
                return adopt
            } else if (item.auditList[0].auditStatus == 1) {
                return adopted
            } else if (item.auditList[0].auditStatus == 0) {
                return questionMark
            }
        }
    } else {
        return questionMark
    }
}
const stockReview = (item: any) => {
    if (item.stockStatus == 4 || item.stockStatus == 0) {
        return questionMark
    } else if (item.stockStatus == 2) {
        return adopt
    } else if (item.stockStatus == 1) {
        return adopted
    } else{
        return questionMark
    }
}
/** 商品status */
const uniquekey = computed(() => {
    return route.query.id;
});
/** 商品详情回传的auditStatus */
const auditStatus: any = computed(() => {
    return route.query.auditStatus;
});
/** 商品详情回传的待入库的勾选数据selectedItem */
const selectedItem: any = computed(() => {
    return route.query.selectedItems;
});
/** 按商品名称搜索 */
const onSearch = () => {
    showTop.value = false
    queryParams.value.supplierName = '';
    queryParams.value.styleName = searchValue.value;
    onRefresh();
};
/** 获取详情 */
const handleGetDetails = (id: string) => {
    router.push({
        path: `/forgeDetail/${id}`,
    });
};
/** 查询商品列表 */
const getList = async () => {
    refreFlag.value = false
    if (uniquekey.value && !flag.value) {
        queryParams.value.auditStatus = uniquekey.value;
        serchListActive.value = Number(uniquekey.value) + 1;
    }
    if (auditStatus.value && !flag.value) {
        queryParams.value.auditStatus = auditStatus.value
        if (auditStatus.value == 10) {
            serchListActive.value = 10
        } else if (auditStatus.value == '-1') {
            serchListActive.value = 11
        } else {
            serchListActive.value = Number(auditStatus.value) + 1;
        }
    }
    const res = await listSupplierAddProduct(queryParams.value);
    res.rows.forEach(async (item) => {
        if (item.productImage) {
            item.productImages = getEnvValue("VITE_APP_PIC_URL") + item.productImage.split(',')[0];
        } else {
            item.productImages = "";
        }
    });
    setTimeout(() => {
        refreFlag.value = true
        // 空数据 停止加载
        if (res.rows.length == 0) {
            list.value = [];
            serchFlag.value = true;
            finished.value = true;
            return;
        }
        // 有数据 赋值列表 加载状态结束
        res.rows.forEach((item) => {
            finished.value = false;
            list.value.push(item);
        });
        // 待入库多选状态
        if (selectedItem.value && selectedItem.value.length > 0 && JSON.parse(selectedItem.value as any).length > 0 && queryParams.value.auditStatus == 8 && !flag.value) {
            multipleChoice.value = true
            selectedItems.value = JSON.parse(selectedItem.value as any)
            list.value.forEach(item => {
                JSON.parse(selectedItem.value as any).forEach(element => {
                    if (item.id == element.id) {
                        item.checked = true
                    }
                });
            })
        }
        loading.value = false;
        refreshing.value = false;
        serchFlag.value = true;
        // 如果list长度大于等于总数据条数，数据全部加载完成
        if (list.value.length >= res.total) {
            finished.value = true; //结束加载
        }
        // 解决快速切换tab导致的列表商品混乱问题
        if (queryParams.value.pageNum == 2 && queryParams.value.auditStatus) {
            list.value = list.value.filter((item) => {
                return item.auditStatus == queryParams.value.auditStatus
            })
        }

    }, 400);
};
/** 加载更多 */
const onLoad = async () => {
    getList();
    queryParams.value.pageNum++;
};
/** 下拉 */
const onRefresh = () => {
    if (refreFlag.value) {
        serchFlag.value = false
        refreFlag.value = false
        finished.value = false; // 清空列表数据
        refreshing.value = false;
        loading.value = true; // 加载状态
        queryParams.value.pageNum = 1; // 分页数赋值为1
        list.value = []; // 清空数组
        onLoad(); // 重新加载数据
    } else {
        finished.value = false;
        refreshing.value = false;
    }
};
/** 设置不同状态不同样式 */
const computedAtatusColor = (name: any) => {
    if (name.includes('待')) {
        return { backgroundColor: '#EBF4FF', color: '#0094FF' }
    } else if (name.includes('驳回') || name == '已下架' || name == '已退还') {
        return { backgroundColor: '#FDE7E7', color: '#FC2540' }
    } else {
        return { backgroundColor: '#E7FDEE', color: '#19D11B' }
    }
}
</script>
<style lang="less" scoped>
:deep(.product_list_serch1 ){
    height: 34px !important;
    // border: solid 1px black;
}

:deep(.van-search__content--round) {
    height: 34px !important;
    padding-left: 0;
    // border: solid 1px black;
}

:deep(.van-search__field) {
    height: 34px !important;
    // border: solid 1px black;
}

.liveStreamingMechanisms {
    position: absolute;
    top: 0;
    left: 0;
    width: 50px;
    height: 20px;
    background: #0094FF;
    border-radius: 2px 0px 2px 0px;
    font-weight: 400;
    font-size: 12px;
    color: #FFFFFF;
    text-align: center;
    line-height: 20px;
}

.product_list {
    width: 100%;
    height: calc(100vh - 50px);
    background-color: #f6faff;
    // padding-top: 10px;
    box-sizing: border-box;

    .nothing_div {
        width: 100%;
        margin: auto;
        text-align: center;
        margin-top: 20vh;
        font-weight: 400;
        font-size: 12px;
        color: #B8BECA;
        line-height: 12px;
        flex-wrap: wrap;

        .van-image {
            width: 160px;
            height: 160px;
        }
    }

    .wrapper {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100%;

        .wrapper_div {
            width: 315px;
            height: 415px;
            background-color: #fff;
            border-radius: 5px;
            position: relative;

            :deep(.van-cell:after) {
                display: none;
            }

            .label {
                font-weight: 400;
                font-size: 14px;
                color: #000000;
                padding-left: 16px;
            }

            :deep(.van-field__control) {
                background: #F6FAFF !important;
                // height: 40px !important;

            }

            ::placeholder {
                font-size: 14px;
                color: #B8BECA;
            }

            .dates {
                :deep(.van-field__control) {
                    height: 40px !important;
                }
            }

            .title {
                font-weight: 500;
                font-size: 16px;
                color: #1A1B1C;
                width: 100%;
                text-align: center;
                margin: 30px 0 20px 0;
            }

            .van-image {
                width: 10px;
                height: 10px;
                position: absolute;
                right: 18px;
                top: 18px;
            }

            :deep(.van-form) {
                min-height: 265px;
            }

            .buttons {
                color: #FFFFFF;
                font-size: 14px;
                width: 285px;
                height: 44px;
                background: #0094FF;
                border-radius: 23px;
                margin: auto;
                display: flex;
                justify-content: center;
                margin-top: 10px;
            }
        }
    }

    :deep(.van-tabs) {
        height: 23px;
        width: calc(100% - 20px);
    }

    :deep(.van-tabs__wrap) {
        height: 45px;
    }

    :deep(.van-tabs__wrap) {
        height: 45px !important;
    }

    :deep(.van-tabs__nav) {
        background-color: #eeeeee;
        // margin-top: 2px;
        padding: 0px !important;
    }

    // van-tab van-tab--line van-tab--grow van-tab--active
    :deep(.van-tabs__line) {
        display: none;
    }

    :deep(.van-tabs__nav--line) {
        height: 45px !important;
        padding-bottom: 0 !important;
    }

    :deep(.van-tab) {
        border: 1px solid #a3a3a3;
        color: #a3a3a3;
        // width: 60px;
        text-align: center;
        height: 20px;
        font-size: 12px;
        border-radius: 4px;
        line-height: 20px;
        margin-right: 10px;
    }

    :deep(.van-text-ellipsis) {
        font-size: 13px !important;
        line-height: 15px !important;
    }

    .button {
        width: 100%;
        position: fixed;
        bottom: 0;
        height: 50px;
        z-index: 100;
        display: flex;
        line-height: 40px;
        background-color: #fff;
        display: flex;
        justify-content: space-around;
        align-items: center;

        .cancel {
            background: #FFFFFF;
            border: 1px solid #0094FF;
            color: #0094FF;
            border-radius: 23px;
        }

        .outbound {
            color: #fff;
            background: #0094FF;
            border-radius: 23px;
        }

        div {
            width: 150px;
            height: 40px;
            text-align: center;
        }
    }

    &_serch {
        display: flex;
        width: calc(100% - 20px);
        align-items: center;
        justify-content: space-between;
        padding: 0 10px;
        margin-top: 5px;
        margin-bottom: 5px;
        height: 23px;

        &_div {
            width: calc(100% - 20px);
            // overflow-x: scroll;
            // overflow-y: hidden;
            height: 23px;
            overflow: hidden;

            &_line {
                height: 23px;
                display: flex;
                width: 760px;
            }
        }

        &_item {
            border: 1px solid #a3a3a3;
            color: #a3a3a3;
            width: 60px;
            text-align: center;
            height: 20px;
            font-size: 12px;
            border-radius: 4px;
            line-height: 20px;
        }

        &_active {
            border: none !important;
            color: #fff;
            background-color: #1466ff;
        }
    }

    :deep(.van-pull-refresh) {
        height: calc(100vh - 155px);
        overflow: scroll;
    }

    &_van_list {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;

        &_div {
            width: 100%;
            height: 80px;
            box-sizing: border-box;
            background-color: #fff;
            border-radius: 3px;
            margin-bottom: 8px;
            // padding: 5px;
            box-sizing: border-box;
            display: flex;
            justify-content: space-between;

            .left_button {
                height: 100%;
            }
        }

        .div_right {
            width: calc(100% - 70px);
            display: flex;
            flex-wrap: wrap;

            .div_right_top {
                margin-top: -5px;
                width: 100%;
                display: flex;
                align-items: center;
                justify-content: space-between;
                padding-left: 10px;

                .style_name {
                    font-size: 14px;
                    font-weight: bold;
                    width: 150px;
                    display: -webkit-box;
                    overflow: hidden;
                    text-overflow: ellipsis;
                    -webkit-line-clamp: 1;
                    -webkit-box-orient: vertical;
                }

                .status {
                    padding: 0 5px;
                    height: 22px;
                    background: #EBF4FF;
                    border-radius: 2px;
                    text-align: center;
                    line-height: 22px;
                    font-weight: 500;
                    font-size: 12px;
                    color: #0094FF;
                }

                .stats {
                    background: #fde7e7;
                    border-radius: 2px;
                    padding: 3px 13px 3px 13px;
                    font-size: 14px;
                    color: #fc2540;
                    text-align: center;
                    border-radius: 3px;
                }

                .stats1 {
                    background: #ebf4ff;
                    border-radius: 2px;
                    padding: 3px 13px 3px 13px;
                    font-size: 14px;
                    color: #0094ff;
                    text-align: center;
                    border-radius: 3px;
                }

                .stats2 {
                    background: #ebf4ff;
                    border-radius: 2px;
                    padding: 3px 13px 3px 13px;
                    font-size: 14px;
                    color: #0094ff;
                    text-align: center;
                    border-radius: 3px;
                }

                .stats3 {
                    background: #ebf4ff;
                    border-radius: 2px;
                    padding: 3px 13px 3px 13px;
                    font-size: 14px;
                    color: #0094ff;
                    text-align: center;
                    border-radius: 3px;
                }

                .stats4 {
                    background: #ebf4ff;
                    border-radius: 2px;
                    padding: 3px 13px 3px 13px;
                    font-size: 14px;
                    color: #0094ff;
                    text-align: center;
                    border-radius: 3px;
                }

                .stats5 {
                    background: #e7fdee;
                    border-radius: 2px;
                    padding: 3px 13px 3px 13px;
                    font-size: 14px;
                    color: #19d11b;
                    text-align: center;
                    border-radius: 3px;
                }

                .stats6 {
                    background: #ebf4ff;
                    border-radius: 2px;
                    padding: 3px 13px 3px 13px;
                    font-size: 14px;
                    color: #0094ff;
                    text-align: center;
                    border-radius: 3px;
                }

                .stats7 {
                    background: #ebf4ff;
                    border-radius: 2px;
                    padding: 3px 13px 3px 13px;
                    font-size: 14px;
                    color: #0094ff;
                    text-align: center;
                    border-radius: 3px;
                }

                .stats8 {
                    background: #ebf4ff;
                    border-radius: 2px;
                    padding: 3px 13px 3px 13px;
                    font-size: 14px;
                    color: #0094ff;
                    text-align: center;
                    border-radius: 3px;
                }

                .stats9 {
                    background: #ebf4ff;
                    border-radius: 2px;
                    padding: 3px 13px 3px 13px;
                    font-size: 14px;
                    color: #0094ff;
                    text-align: center;
                    border-radius: 3px;
                }

                .stats10 {
                    background: #e7fdee;
                    border-radius: 2px;
                    padding: 3px 13px 3px 13px;
                    font-size: 14px;
                    color: #19d11b;
                    text-align: center;
                    border-radius: 3px;
                }

                .stats11 {
                    background: #fde7e7;
                    border-radius: 2px;
                    padding: 3px 13px 3px 13px;
                    font-size: 14px;
                    color: #fc2540;
                    text-align: center;
                    border-radius: 3px;
                }

            }

            .div_right_center {
                padding-top: 5px;
                padding-left: 10px;
                width: 100%;
                height: 15px;
                font-size: 12px;
                color: #b8beca;
                display: -webkit-box;
                overflow: hidden;
                text-overflow: ellipsis;
                -webkit-line-clamp: 2;
                -webkit-box-orient: vertical;
            }

            .div_right_bottom {
                margin-top: 5px;
                padding-left: 10px;
                display: flex;
                width: 100%;
                align-items: center;
                justify-content: space-between;
                margin-bottom: 5px;

                .price {
                    font-size: 12px;
                    color: #fc2540;
                    font-weight: 500;
                    white-space: nowrap;
                }

                .costPrice {
                    font-size: 11px;
                    color: #a3a3a3;
                    font-weight: 500;
                    white-space: nowrap;
                    margin-left: 10px;
                }

                .commission {
                    font-weight: 500;
                    font-size: 12px;
                    color: #fc2540;
                    // border: solid 1px black;
                    white-space: nowrap;
                    // width: 20%;
                    // margin-left: 20px;
                }

                .anchor {
                    margin-left: auto;
                    padding-left: 15px;
                    font-weight: 400;
                    font-size: 12px;
                    color: #b8beca;
                    //   width: 20%;
                    //   border: 1px solid #ffb0b0;
                    //   padding: 1px 2px;
                    text-align: center;
                    white-space: nowrap;
                    /* 确保文本在一行内显示 */
                    overflow: hidden;
                    /* 隐藏溢出的内容 */
                    text-overflow: ellipsis;
                }
            }

            .liveStreamingMechanism {
                font-size: 11px;
                color: #a3a3a3;
                margin-left: 15px;
                display: flex;
                justify-content: space-between;
                align-items: center;
                width: 100%;
                //   width: 20%;
                // text-align: right;
            }
        }

        .warehousing {
            width: 100%;
            // height: 54px;
            display: flex;
            justify-content: space-between;
            flex-direction: row-reverse;
            flex-wrap: wrap;
            margin: 5px 0 0 0;

            .adopt_icon {
                width: 100%;
                display: flex;
                align-items: center;
                font-weight: 400;
                font-size: 12px;
                color: #1A1B1C;
                justify-content: space-between;

                .adopt_icon_item {
                    display: flex;
                    align-items: center;
                    // margin-right: 30px;
                }

                .van-image {
                    width: 12px;
                    height: 12px;
                    margin-left: 5px;
                }
            }

            .warehousing_button {
                width: 84px;
                height: 24px;
                background: #0094FF;
                border-radius: 2px;
                text-align: center;
                font-weight: 400;
                font-size: 14px;
                color: #FFFFFF;
                line-height: 24px;
                margin-top: 5px;
            }
        }
    }

    .pop_content {
        width: 100%;
        height: auto;
        position: fixed;
        z-index: 999;
    }

    :deep(.van-nav-bar) {
        position: fixed;
        z-index: 1001;
        width: 100%;
        height: 50px;
    }

    .buttons {
        font-size: 10px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        width: 100%;
        margin-top: 10px;

        .cancel {
            width: 162px;
            height: 44px;
            border-radius: 23px;
            border: 1px solid #1A1B1C;
            background-color: #fff;
            color: #000;
            font-size: 14px;
            color: #1A1B1C;
            line-height: 44px;
            text-align: center;
        }

        .save {
            width: 162px;
            height: 44px;
            background: #0094FF;
            border-radius: 23px;
            color: #FFFFFF;
            font-size: 14px;
            line-height: 44px;
            text-align: center;
        }
    }

    :deep(.van-search__field) {
        background-color: #fff;
        border-radius: 20px;
        padding-left: 15px;
        // padding-right: 60px;
    }

    .launch_div {
        padding: 0px 10px 0 10px;
        box-sizing: border-box;
        padding-top: 90px;

        .buttons {
            font-size: 10px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            width: 100%;
            margin-top: 10px;

            .cancel {
                width: 162px;
                height: 44px;
                border-radius: 23px;
                border: 1px solid #1A1B1C;
                background-color: #fff;
                color: #000;
                font-size: 14px;
                color: #1A1B1C;
                line-height: 44px;
                text-align: center;
            }

            .save {
                width: 162px;
                height: 44px;
                background: #0094FF;
                border-radius: 23px;
                color: #FFFFFF;
                font-size: 14px;
                line-height: 44px;
                text-align: center;
            }
        }
    }

    .launch_title {
        font-size: 14px;
        line-height: 40px;
        color: #1A1B1C;
    }

    .pop_div {
        width: 100%;
        height: 100%;
        display: flex;
        flex-wrap: wrap;

        .pop_div_out {
            width: 25%;
            min-width: 78px;
            display: flex;
            justify-content: center;
            height: 30px;
            border-radius: 15px;
            line-height: 30px;
            font-size: 14px;
            margin-bottom: 15px;
        }

        .pop_div_item {
            width: 78px;
            display: flex;
            justify-content: center;
            height: 30px;
            border-radius: 15px;
            line-height: 30px;
            font-size: 12px;
        }
    }
}

:deep(.van-search__field){
    background-color: #fff;
    border-radius: 20px;
    padding-left: 15px;
}

.product_list_serch-text {
    display: flex;
    align-items: center;
    width: 100%;
    background: #f6faff;
    height: 34px;
    margin: 10px 0;
    position: relative;

    //   border: solid 1px black;
    .search_left_button {
        width: 54px;
        height: 26px;
        font-weight: 400;
        font-size: 10px;
        color: #FFFFFF;
        position: absolute;
        right: 18px;
        top: 50%;
        transform: translateY(-50%);
    }
}

@keyframes wrapper-gradient {
    0% {
        top: -1000px;
    }

    100% {
        top: 98px;
    }
}

.mongolian_layer {
    width: 100%;
    height: calc(100vh - 144px);
    position: absolute;
    // animation: wrapper-gradient 0.4s linear;
    // z-index: 1000;

    .mongolian_layer_layer {
        width: 100%;
        height: calc(100% - 60px);
        position: absolute;
        z-index: 6000;
        background: #000000;
        opacity: 0.73;
        margin-top: 60px;

    }

    .mongolian_layer_options {
        width: 100%;
        height: 60px;
        background: #FFFFFF;
        display: flex;
        justify-content: space-around;
        align-items: center;
        position: absolute;
        z-index: 6000;


        .mongolian_layer_div {
            width: 40%;
            height: 30px;
            border-radius: 15px;
            border: 1px solid #0094FF;
            text-align: center;
            font-size: 14px;
            color: #0094FF;
            line-height: 30px;
        }
    }
}

.product_list_serch1 {
    display: flex;
    align-items: center;
    background: #f6faff;
    width: 100%;
    height: 34px;
    //   position: relative;
}

.product_list_serch2 {
    width: 15%;
    display: flex;
    height: 34px;
    align-items: center;
}

.product_list-btn {
    width: 54px;
    height: 26px;
    font-size: 14px;
    color: #ffffff;
    border: none;
    background: #0094ff;
    white-space: nowrap;
    //   position: absolute;
}

.product_list-btn-screen {
    display: flex;
    display: flex;
    align-items: center;
}

.product_list-btn-screen-image {
    width: 13px;
    height: 15px;
    background-image: url("../../assets/home/icon_shaixuan.png");
    background-size: 100% 100%;

    //   background-size: 100% 100%;
}

.product_list-btn-screen-text {
    display: flex;
    align-items: center;
    height: 18px;
    font-size: 14px;
    color: #1a1b1c;
    margin-left: 5px;
}

.product_list_serch {
    background: #fff;
    height: 45px;
    margin: 0 !important;
}

:deep(.van-tab__text) {
    background: none !important;
}

:deep(.van-tab--grow) {
    font-size: 14px !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: #fff !important;
    border-radius: 0 !important;
}

:deep .van-tab--grow {
    height: 40px;
}

// van-tabs__nav van-tabs__nav--line
// van-tabs__nav van-tabs__nav--line
:deep(.van-tab--active) {
    // border: solid 1px black !important;
    height: 40px !important;
    // margin-top: 10px !important;
    background: #fff !important;
    color: #0094ff !important;
    font-size: 14px !important;

    background-color: #1466ff;
    // padding-bottom: 15px;
    // border: solid 1px black !important;
    border-bottom: #0094ff solid 3px !important;
    z-index: 999;
}

:deep(.van-tabs__wrap) {
    background: #fff !important;
}

:deep(.van-tabs__nav--complete) {
    background: #fff !important;
    height: 45px !important;
    display: flex !important;
    align-items: center !important;
    padding-top: 3px;
    margin-top: -3px;
}

.van-tab--grow {
    //   border: none;
}

.van-image {
    width: 74px;
    height: 74px;
    margin-left: 5px;
}

:deep(.van-image__img) {
    border-radius: 5px !important;
}

.van-tabs--line {
    height: 45px !important;
    margin-left: 10px;
}

.product_list_van_list {
    margin-top: 10px;
    background: #f6faff;
}

.product_list_van_list_div {
    // border: solid 1px black;
    // padding: 10px 15px 10px 15px;
    height: 150px;
    display: flex;
    align-items: center;

    :deep(.van-swipe-cell__wrapper) {
        flex-wrap: wrap;
        align-content: center;
    }

    .button_div {
        height: 100%;
    }

    .button_list {
        height: 100%;
        // width: 140px;
        display: flex;
        align-items: center;

        .van-image {
            width: 20px;
            height: 20px;
        }

        .parmay {
            width: 70px;
            height: 100%;
            font-size: 14px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }

        .danger {
            background: #FC2540;
            width: 70px;
            height: 100%;
            font-size: 14px;
            color: #FFFFFF;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }
    }
}

:deep(.van-action-sheet__header) {
    font-weight: 500 !important;
    font-size: 16px !important;
    color: #1a1b1c !important;
    // border: solid 1px black !important;
}

:deep(.van-action-sheet__item){
    font-size: 14px;
    color: #b8beca;
}

:deep(.van-swipe-cell) {
    width: 100%;
    height: 100%;
}

:deep(.van-swipe-cell__wrapper) {
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 10px;
}

:deep(.van-checkbox) {
    overflow: visible;
}

:deep(.van-toast){
    z-index: 10000 !important;
}

:deep(.van-popup) {
    z-index: 6002 !important;
}
</style>